<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   	<%
   	String user_type="";
   	if(session.getAttribute("session_user_type")!=null){
   		user_type = session.getAttribute("session_user_type").toString();
   	}
   	
   	String to_url = "/";  
	if(request.getParameter("to_url")!=null && !request.getParameter("to_url").equals("")){
		to_url = request.getParameter("to_url");
	}	

	String url = "";
   	if(user_type.equals("0") || user_type.equals("1") || user_type.equals("2") || user_type.equals("3")){
   		url = "/program/logout/index.jsp";
   	}

   		Cookie[] cookies = request.getCookies();   
        if(cookies!=null){   
			for(int i=0;i<cookies.length;i++){   
			  cookies[i].setPath("/");
			  cookies[i].setMaxAge(0);   
			  response.addCookie(cookies[i]);     
			}
         }
   		 url = to_url;

 		
 	%>
		<script type="text/javascript">
			window.location.href='<%=url%>';
		</script>
    <title>my account</title>
  </head>
  <body></body>
</html>